def run(params:list[str]):
    from ApiTools import apiTools,apiBase
    from langchain_core.tools import Tool, tool

    prompt=apiBase.argv(1,"调用hello,参数:hi")
    func = apiBase.argv(2,"CmRlZiBoZWxsbyhwYXJhbTpzdHIpIC0+IHN0cjoKICAgIHJldHVybiAiaGkiIAo=")
    try:
        #创建临时agent
        agent_tools = apiTools.load_python_tools(func)            
        agent_executor = apiTools.create_agent(agent_tools)
        if agent_executor:
            ret = apiTools.agent_query(agent_executor,prompt)
            print(ret)
        else:
            print("创建agent错误:1:api和apiname的个数不同;2:api错误;")
    except Exception as e:
        print(f"llm调用错误:{e}")
    finally:
        apiBase.close()